<!--添加栏目-->
<div class="dialog_content">
	<form id="info_form" action="{:U('PositionCate/add')}" method="post">
	<table width="100%" class="table_form">
		<tr>
			<th>推荐位名称 :</th>
			<td><input type="text" name="title" id="title" class="input-text" size="30"></td>
		</tr>
        <tr>
            <th>所属模型 :</th>
            <td>
                <volist name="model" id="vo">
                <label><input type="radio" name="model" value="{$key}" <if condition="$i eq 1"> checked="checked"</if>> {$vo}</label>&nbsp;&nbsp;
                </volist>
            </td>
        </tr>
        <tr>
		<th>{:L('enabled')} :</th>
            <td>
                <label><input type="radio" name="status" value="1" checked="checked"> {:L('yes')}</label>&nbsp;&nbsp;
                <label><input type="radio" name="status" value="0"> {:L('no')}</label>
            </td>
        </tr>
	</table>
	</form>
</div>
<script>
$(function(){
	$.formValidator.initConfig({formid:"info_form",autotip:true});
	$("#title").formValidator({onshow:'填写推荐位名称',onfocus:'填写推荐位名称'}).inputValidator({min:1,onerror:'填写推荐位名称'});
	
	$('#info_form').ajaxForm({success:complate,dataType:'json'});
	function complate(result){
		if(result.status == 1){
			$.dialog.get(result.dialog).close();
			$.pinphp.tip({content:result.msg});
			window.location.reload();
		} else {
			$.pinphp.tip({content:result.msg, icon:'alert'});
		}
	}


});
</script>